-- ***********************************************
-- * Kindle
-- ***********************************************
------
function features_kindle(damage,addrage,attacker,receiver,minmax)

	if (minmax==0)
	and damage>0 then

		local burn=tonumber(Attack.get_custom_param("burn"))
		if burn == nil then burn = 0 end
		if Game.CurLocRand(1,100)<=burn then

			effect_burn_attack(receiver,0,3,nil,attacker)
		end
	end 
	return damage,addrage
end
--------
-- ***********************************************
-- * Fire Shield
-- ***********************************************
--------
function features_fire_shield(damage,addrage,attacker,receiver,minmax,userdata,hitbacking)

	if minmax == 0
	and damage > 0
	and not hitbacking
	and Attack.atk_class() == "moveattack" then
		
		if Game.CurLocRand(1,100)<=102
		and Attack.act_get_res(attacker,"fire")<80
		and (Attack.cell_dist(attacker,receiver)==1) then

			damage = damage*.8
			addrage = addrage*.8

			effect_burn_attack(attacker,0,2,false,receiver)
			if Attack.act_size(attacker) > 1 then
				 Attack.log_special("<label=cpsn_"..Attack.act_name(attacker)..">")
			else
				Attack.log_special("<label=cpn_"..Attack.act_name(attacker)..">")
			end

			Attack.act_damage_addlog(receiver,"add_blog_fire_shield_")
		end	
	end 
	return damage,addrage
end 
--------
-- ***********************************************
-- * Antibondage
-- ***********************************************
--------
function features_antibondage(damage,addrage,attacker,receiver,minmax,userdata,hitbacking,hitback_enabled)

	if (Attack.act_is_spell(receiver, "spell_magic_bondage")
	or Attack.act_is_spell(receiver, "special_stupid")) then

		Attack.act_del_spell(receiver, "spell_magic_bondage")
		Attack.act_del_spell(receiver, "special_stupid")

	elseif minmax == 0 then

		Attack.act_posthitslave(receiver,"features_antibondage",0)
	end
	return damage,addrage
end
--------